package com.example.test02mybatisplus.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.test02mybatisplus.annotation.AddNameInsert;
import com.example.test02mybatisplus.entity.UserGood;
import com.example.test02mybatisplus.entity.domain.Good;
import com.example.test02mybatisplus.entity.domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: fxy
 * @Date: 2021/12/27/10:56
 * @Description:
 */
public interface UserMapper extends BaseMapper<User> {

    @Override
    int insert(User entity);

    List<User> selectUser(User user);

    List<User> selectUserByName(@Param("name") String name);
    List<User> selectByName(String name);
    int insertBatch(List<User> y);
    List<UserGood> selectUserGood(QueryWrapper<User> objectQueryWrapper);

    List<UserGood> selectUserGood1(QueryWrapper<User> objectQueryWrapper);
    List<Good> selectGoods();

    List<User> queryList(User user);

    List<User> query(@Param("id") String id,@Param("name") String name);

    void updateBach(List<User> list);
}